package CreationModel.FactoryMode.FactoryMethodModel;

/**
 * @author 王蕾 [wanglei_dev@cyou-inc.com]
 * @date 2017-11-22 18:23:00
 */
class AddOperation extends Operation{
    @Override
    public double getResult() {
        return getNumberA()+getNumberB();
    }
}

class SubOperation extends Operation{
    @Override
    public double getResult() {
        return getNumberA()-getNumberB();
    }
}

public class Operation {

    public double numberA;
    public double numberB;


    public double getNumberA() {
        return this.numberA;
    }

    public void setNumberA(double numberA) {
        this.numberA = numberA;
    }

    public double getNumberB() {
        return this.numberB;
    }

    public void setNumberB(double numberB) {
        this.numberB = numberB;
    }

    public double getResult(){
        return 0;
    }
}
